<template>
	<view class="mainpadding" v-if="pageShow">
		<!-- <u-parse :content="content"></u-parse> -->
		<view class="" v-html="content"></view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				systeminfo: {},
				type: "",
				pageShow: false,
				content:"",
				sendtext:"user_xy"
			}
		},
		onLoad(options) {
			let type = options.type
			this.type = type
			if (type == 1) {
				uni.setNavigationBarTitle({
					title: "用户协议"
				})
				this.systemxy();
			}
			if (type == 2) {
				uni.setNavigationBarTitle({
					title: "隐私政策"
				})
				this.sendtext="user_yszc"
				this.systemxy();
			}
			if (type == 3) {
				uni.setNavigationBarTitle({
					title: "协议说明"
				})
				this.sendtext="plg_xysm"
				this.systemxy();
			}
			if (type == 4) {
				uni.setNavigationBarTitle({
					title: "关于我们"
				})
				this.sendtext="about_us"
				this.systemxy();
			}
			
		},
		methods: {
			settitle(val) {
				
			},
			systemxy(){
				httpRequest.request('/api/index/getConfigInfoItem', 'GET', {type:this.sendtext}).then(res => {
					this.content = res.data
					this.pageShow = true
					let type = this.type
					if (type == 1) {
						uni.setNavigationBarTitle({
							title: "用户协议"
						})
					}
					if (type == 2) {
						uni.setNavigationBarTitle({
							title: "隐私政策"
						})
					}
					if (type == 3) {
						uni.setNavigationBarTitle({
							title: "协议说明"
						})
					}
					if (type == 4) {
						uni.setNavigationBarTitle({
							title: "关于我们"
						})
					}
				})
			},
		}
	}
</script>

<style>

</style>